<?php
/*class Jingking {
	private static $myclass;
	protected $rand = 1;
	function __construct() {
		$ddd = 1;
		$aaa = 2;
	}
	
	public static function createclass() {
		if(self::$myclass === null) {
			self::$myclass = new Jingking();
			//self::$rand = 1;
		}
		return self::$myclass;
	}
	
	function show() {
		return $this->rand;
	}

}

$ooo = Jingking::createclass();
echo $ooo->show();
echo "<br>";

$ooo = Jingking::createclass();
echo $ooo->show();*/



class NewClass {
	private static $myclass;
	var $str = '';
	var $num = '';
	function __construct() {
		$this->str = "a";
		$this->num = 2;
	}
	public function createclass() {
		if(self::$myclass === null) {
			self::$myclass = new NewClass();
		}
		return self::$myclass;
	}
	public function show() {
		return $this->num;
	}
}
$ooo = NewClass::createclass();
echo $ooo->show();
$ooo = NewClass::createclass();
echo $ooo->show();
echo "<br>";
echo md5(123456);
echo "<br>";

$mem = new Memcache();
 $mem->addserver("127.0.0.1", 11211);
 $mem->set("mykey", "This is a test cache!", 0, 60);
 $val = $mem->get("mykey");
 echo $val;

?>